package cn.com.gzheroli.core.listener;

import java.util.List;

import javax.servlet.ServletContextEvent;

import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;




/**
 * 系统初始化监听器,在系统启动时运行,进行一些初始化工作
 *
 */
public class InitListener  implements javax.servlet.ServletContextListener {
	private static ApplicationContext ctx = null;
	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		
	}


	public static ApplicationContext getCtx() {
		return ctx;
	}
	
	
	@Override
	public void contextInitialized(ServletContextEvent event) {
		 ctx = WebApplicationContextUtils.getWebApplicationContext(event.getServletContext());
	}

}
